package asphalt2
{
	import flash.utils.ByteArray;
	
	public dynamic class BigDecimal
	{
		public static const ROUND_CEILING:int = MathContext.ROUND_CEILING;

		public static const ROUND_DOWN:int = MathContext.ROUND_DOWN;
		
		public static const ROUND_FLOOR:int = MathContext.ROUND_FLOOR;
		
		public static const ROUND_HALF_DOWN:int = MathContext.ROUND_HALF_DOWN;
		
		public static const ROUND_HALF_EVEN:int = MathContext.ROUND_HALF_EVEN;
		
		public static const ROUND_HALF_UP:int = MathContext.ROUND_HALF_UP;
		
		public static const ROUND_UNNECESSARY:int = MathContext.ROUND_UNNECESSARY;
		
		public static const ROUND_UP:int = MathContext.ROUND_UP;
		
		public static const ispos:int = 1;
		
		public static const iszero:int = 0;
		
		public static const isneg:int = -1;
		
		public static const MinExp:Number = -999999999; // minimum exponent allowed
		
		public static const MaxExp:Number = 999999999; // maximum exponent allowed
		
		public static const MinArg:int = -999999999; // minimum argument integer
		
		public static const MaxArg:int = 999999999; // maximum argument integer
		
		public static const plainMC:MathContext = new MathContext(0, MathContext.PLAIN);
		
		public static const bytecar:Array = new Array((90 + 99) + 1);
		
		public static const bytedig:Array = diginit();
		
		public static const ZERO:BigDecimal = new BigDecimal("0");
		
		public static const ONE:BigDecimal = new BigDecimal("1");
		
		public static const TEN:BigDecimal = new BigDecimal("10");

		private var ind:int = 0;
	  	private var form:int = MathContext.prototype.PLAIN;
		private var mant:ByteArray = null;
		private var exp:int = 0;

		public function BigDecimal(str:String)
		{
		}

		private static function div(a:Number, b:Number):Number{
    		return (a-(a%b))/b;
		}
		private static function arraycopy(src:Array,srcindex:int, dest:Array, destindex:int, length:int):void {
    		var i:int;
			if (destindex > srcindex) {
		        // in case src and dest are equals, but also doesn't hurt
		        // if they are different
		        for (i = length-1; i >= 0; --i) {
		            dest[i+destindex] = src[i+srcindex];
		        }
		    } else {
		        for (i = 0; i < length; ++i) {
		            dest[i+destindex] = src[i+srcindex];
		        }
		    }
		}
		private static function createArrayWithZeros(length:int):Array {
		    var retVal:Array = new Array(length);
		    for (var i:int = 0; i < length; ++i) {
		        retVal[i] = 0;
		    }
		    return retVal;
		}

		private static function diginit():Array {
			// --byte work[];
			var work:Array;
			// --int op=0;
			var op:int = 0;
			// --int digit=0;
			var digit:int = 0;
			work = new Array((90 + 99) + 1);
			{
				op = 0;
				op: for (; op <= (90 + 99); op++) {
					digit = op - 90;
					if (digit >= 0) {
						work[op] = (digit % 10);
						bytecar[op] = (div(digit, 10)); // calculate
						// carry
						continue op;
					}
					// borrowing...
					digit = digit + 100; // yes, this is right [consider -50]
					work[op] = (digit % 10);
					bytecar[op] = ((div(digit, 10)) - 10); // calculate
					// borrow
					// [NB:
					// -
					// after
					// %]
				}
			}/* op */
			return work;
		}
		
		public function abs(){
		}
		public function add(){
		}
		public function compareTo(){
		}
		public function divide(){
		}
		public function divideInteger(){
		}
		public function max(){
		}
		public function min(){
		}
		public function multiply(){
		}
		public function negate(){
		}
		public function plus(){
		}
		public function pow(){
		}
		public function remainder(){
		}
		public function subtract(){
		}
		public function equals(){
		}
		public function format(){
		}
		public function intValueExact(){
		}
		public function movePointLeft(){
		}
		public function movePointRight(){
		}
		public function scale(){
		}
		public function setScale(){
		}
		public function signum(){
		}
		public function toString(){
		}
		public function layout(){
		}
		public function intcheck(){
		}
		public function dodivide(){
		}
		public function bad(){
		}
		public function badarg(){
		}
		public function extend(){
		}
		public function byteaddsub(){
		}
		public function clone(){
		}
		public function checkdigits(){
		}
		public function round(){
		}
		public function allzero(){
		}
		public function finish(){
		}
	}
}